Skip to content

ci: ?????????? workflow - #43

Closed
Dame-time-0034 wants to merge 1 commit into
OpenHUTB:hutbfrom
Dame-time-0034:ci/automation-tests
Closed

Dame-time-0034 wants to merge 1 commit into
OpenHUTB:hutbfrom
Dame-time-0034:ci/automation-tests

Conversation

@Dame-time-0034

@Dame-time-0034 Dame-time-0034 commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

解决 #11:把原来需要在编辑器界面里手动点击的自动化测试,改为 GitHub Actions 中可直接执行的命令行方式。

做法

  • 复用现有 self-hosted runner([self-hosted, Linux, X64])
  • 构建 UE4Editor Linux Development,再用一个空 .uproject 运行引擎自带测试(引擎仓库本身不含工程文件):
    UE4Editor AutomationTest.uproject \
      -ExecCmds="Automation RunTests <filter>" \
      -unattended -nopause -nullrhi -nosound -NoEnginePlugins -log \
      -TESTEXIT="Automation Test Queue Empty" \
      -ReportExportPath=Saved/Automation/Reports
  • -NoEnginePlugins:避免空工程加载未编译的引擎插件导致启动失败
  • xvfb-run:runner 没有图形会话时提供虚拟显示
  • 解析 index.json 判定结果:编辑器在测试失败时仍返回 0,不能只看退出码;进程崩溃时返回非 0
  • 报告和日志通过 artifact 上传

已验证内容(Ubuntu 24.04 + UE 4.26,服务器实测)

  1. 单测复跑:System.Core.Misc.Timespan 连续 2 次 Passed,EXIT_CODE=0
  2. 空工程 + -NoEnginePlugins 可正常启动并执行测试;不加该参数会因 ExampleDeviceProfileSelector、LocationServicesBPLibrary 模块缺失而退出
  3. 默认测试集 13 个测试:succeeded=13、failed=0、notRun=0,EXIT_CODE=0,耗时约 1 分钟(含编辑器启动)
  4. -ReportExportPath 正确生成 index.json / index.html
  5. 已知限制:System.Core.Misc 全量会跑到引擎自带的 AsyncIODelete 测试并触发 SIGSEGV(退出码 139),默认测试集已避开

说明

  • GIT_CODE 通过 secret 传入,只在 runner 首次运行、.git/ue4-gitdeps 不存在时需要;已有缓存时直接复用
  • 测试过滤条件可通过 workflow_dispatch 输入调整,后续可直接扩充

Closes #11

@donghaiwang

Copy link
Copy Markdown
Member

PR页面显示的信息都是问号:

image

@Dame-time-0034

Copy link
Copy Markdown
Contributor Author

抱歉,现在就改

@Dame-time-0034
Dame-time-0034 deleted the ci/automation-tests branch November 6, 2026 11:42
@Dame-time-0034

Copy link
Copy Markdown
Contributor Author

此 PR 因标题/正文/提交信息中文乱码已关闭,已用正确的 UTF-8 重建:#44 。验证内容见新 PR 描述。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

启用自动测试插件

2 participants